﻿#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
	int num = 0;
	if(scanf("%d", &num) == EOF)return 0;	
	do
	{
		if (num % 2 == 0)
		{
			//while (num != 0)
			//{
			printf("%d/%d = %d\n", num, 2, num / 2);
			num /= 2;
			//}
		}
		else
		{
			if (num == 1)break;
			//num = num * 3 + 1;
			printf("%d*%d+%d = %d\n", num, 3, 1, num*3 + 1);
			num = num * 3 + 1;
		}
	} while (num != 0);
	printf("End\n");
	return 0;
}
//void even_pro(int x)
//{
//	
//}
//
//void odd_pro(int x)
//{
//	printf("%d*%d+%d = %d", x, 3, 1, x * 3 + 1);
//}